package com.rc.scripting.plugin;

/**
 * <p>
 * This interface is the manager of all plug-ins, one can install
 * plug-in into it, can get plug-in which in manager by it's name
 * and un-install one which is already installed, etc.
 * </p>
 * @author juntao.qiu@gmail.com
 * @date 2010-5-13
 */
public interface PluginManager {
	/**
	 * get plug-in by the given name
	 * @param name
	 * @return
	 */
	Plugin getPlugin(String name);
	
	/**
	 * install the plug-in in manager(consider it kind of a container)
	 * @param plugin
	 */
	void install(Plugin plugin);
	
	/**
	 * un-install the plug-in which is installed already in the manager
	 * @param plugin
	 * @return
	 */
	Plugin uninstall(Plugin plugin);
	
	/**
	 * get the number of all the plug-ins in the manager
	 * @return
	 */
	int getPluginCount();
}
